package com.doufeng.base.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.List;

@Data
public class RegisterDTO {
    @NotBlank
    private String username;
    @NotBlank @Size(min = 6)
    private String password;
    @NotBlank @Pattern(regexp = "^1[3-9]\\d{9}$")
    private String phone;

    // 扩展信息
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthday;
    private String idCard;
    private List<String> certificates;
}
